package com.ruoyi.system.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.MealStatisticsVO;
import com.ruoyi.system.service.IMealStatisticsService;
import java.util.List;

/**
 * 培训用餐统计Controller
 */
@RestController
@RequestMapping("/meal/statistics")
public class MealStatisticsController extends BaseController {

    @Autowired
    private IMealStatisticsService mealStatisticsService;

    /**
     * 查询培训用餐统计列表
     */
    @GetMapping("/list")
    public AjaxResult list(@RequestParam String month) {
        List<MealStatisticsVO> list = mealStatisticsService.getMealStatisticsByMonth(month);
        return AjaxResult.success(list);
    }
}